package com.lfy.modules.safety.statistics.heartbeat;

import lombok.Data;

import java.util.Objects;

/**
 * 心跳实体
 *
 * @author <a href="https://www.lvfeiy.top">lvfeiyang</a>
 * @date 2024/5/18 22:34
 */
@Data
public class HeartBeat {
    private String id;
    private long timestamp;

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){ return false;}
        HeartBeat heartBeat = (HeartBeat) o;
        return Objects.equals(id, heartBeat.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
